
#pragma once

#include <cstddef>
#include <typeinfo>
#include <type_traits>

#include "gtest/gtest.h"

template <typename T1, typename T2>
::testing::AssertionResult ExpectSameType(const char* T1_str, const char* T2_str,
                                         const T1& /*T1_*/, const T2& /*T2_*/) 
{
	if (std::is_same<T1, T2>::value) 
    	return ::testing::AssertionSuccess();
 
	return ::testing::AssertionFailure()
    	<< "Types incorrect: " << T1_str << " , " << T2_str << std::endl
    	<< "       Expected: " << typeid (T1).name() << std::endl
        << "        With is: " << " -- " << std::endl
    	<< "         Actual: " << typeid (T2).name() << std::endl
    	<< "        With is: " << " -- ";
}

#define EXPECT_SAME( T1, T2 ) EXPECT_PRED_FORMAT2( ExpectSameType , T1 (), T2 ()); 
#define UNUSED(v)			  (v) = (v);

#define TYPE_PARAM            typename TypeParam::template assign